package com.nuedu.corejava.ch9.homework;

import java.util.Scanner;
//5、有一个字符串，其中包含中文字符、英文字符和数字字符，请统计和打印出各个字符的个数。 [选做题]
public class HomeWork5 {
	public static void main(String[] args) {
		System.err.println("请输入字符串");
		Scanner scanner = new Scanner(System.in);
		String a = scanner.nextLine();
		char[] ch = a.toCharArray();
		int numer=0,english=0,black=0;
		for (int i = 0; i < ch.length; i++) {
			if (ch[i]>='0'&&ch[i]<='9') {
				 numer++;
			}else if (ch[i]>='a'&&ch[i]<='z'||ch[i]>='A'&&ch[i]<='Z') {
				english++;
			}else {
				black++;
			}
		}
		System.out.println("number:"+numer+",english:"+english+",black:"+black);
	}
	

}
